
# 将打印三角形的四个函数，放入类 Shape 中，定义为静态方法，然后调用
class Shape:
    @staticmethod
    def triangle1(n):
        for line in range(1, n+1):  # line代表第几行
            print('*' * line)

    @staticmethod
    def triangle2(n):
        for line in range(1, n+1):
            star_count = line
            blank_count = n - star_count
            aline = ' ' * blank_count + '*' * star_count
            print(aline)

    @staticmethod
    def triangle3(n):
        for star_count in range(n, 0, -1):
            print('*' * star_count)

    @staticmethod
    def triangle4(n):
        for star_count in range(n, 0, -1):
            blank_count = n - star_count
            aline = ' ' *  blank_count + '*' * star_count
            print(aline)

def main():
    n = int(input('请输入:'))
    Shape.triangle1(n)
    print('---------')
    Shape.triangle2(n)
    print('---------')
    Shape.triangle3(n)
    print('---------')
    Shape.triangle4(n)

main()